Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 5 - Attribute Objects


Summary of Attribute Objects

C Summary

Constants

typedef enum TQ3AttributeTypes {
   kQ3AttributeTypeNone                            = 0,
   kQ3AttributeTypeSurfaceUV                       = 1,
   kQ3AttributeTypeShadingUV                       = 2,
   kQ3AttributeTypeNormal                          = 3,
   kQ3AttributeTypeAmbientCoefficient              = 4,
   kQ3AttributeTypeDiffuseColor                    = 5,
   kQ3AttributeTypeSpecularColor                   = 6,
   kQ3AttributeTypeSpecularControl                 = 7,
   kQ3AttributeTypeTransparencyColor               = 8,
   kQ3AttributeTypeSurfaceTangent                  = 9,
   kQ3AttributeTypeHighlightState                  = 10,
   kQ3AttributeTypeSurfaceShader                   = 11
} TQ3AttributeTypes;
#define kQ3MethodTypeAttributeCopyInheritQ3_METHOD_TYPE('a','c','p','i')
#define kQ3MethodTypeAttributeInherit  Q3_METHOD_TYPE('i','n','h','t')

Data Types

typedef TQ3ElementType                       TQ3AttributeType;

Attribute Objects Routines

Drawing Attributes

TQ3Status Q3Attribute_Submit(TQ3AttributeType attributeType, 
const void *data, 
TQ3ViewObject view);

Creating and Managing Attribute Sets

TQ3AttributeSet Q3AttributeSet_New (
void);
TQ3Status Q3AttributeSet_Add(TQ3AttributeSet attributeSet, 
TQ3AttributeType type, 
const void *data);
TQ3Boolean Q3AttributeSet_Contains (
TQ3AttributeSet attributeSet, 
TQ3AttributeType attributeType);
TQ3Status Q3AttributeSet_Get(TQ3AttributeSet attributeSet, 
TQ3AttributeType type, 
void *data);
TQ3Status Q3AttributeSet_GetNextAttributeType (
TQ3AttributeSet source, 
TQ3AttributeType *type);
TQ3Status Q3AttributeSet_Empty(TQ3AttributeSet target);
TQ3Status Q3AttributeSet_Clear(TQ3AttributeSet attributeSet, 
TQ3AttributeType type);
TQ3Status Q3AttributeSet_Submit (
TQ3AttributeSet attributeSet, 
TQ3ViewObject view);
TQ3Status Q3AttributeSet_Inherit (
TQ3AttributeSet parent, 
TQ3AttributeSet child, 
TQ3AttributeSet result);

Registering Custom Attributes

TQ3ObjectClass Q3AttributeClass_Register (
TQ3AttributeType attributeType, 
const char *creatorName, 
unsigned long sizeOfElement, 
TQ3MetaHandler metaHandler);

Application-Defined Routines

typedef TQ3Status (*TQ3AttributeCopyInheritMethod) (
const void *fromInternalAttribute,
void *toInternalAttribute);
typedef TQ3Boolean TQ3AttributeInheritMethod;

Errors
kQ3ErrorAttributeNotContainedAttribute not contained in attribute set
kQ3ErrorAttributeInvalidTypeInvalid type of attribute


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996